package com.zyk.scaffold.tcp.components;

import com.zyk.scaffold.tcp.wrappers.MessageWrapper;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class PersistentLayerComponent {

    @Resource
    private MongoTemplate mongoTemplate;

    public boolean save(MessageWrapper messageWrapper){
        mongoTemplate.insert(messageWrapper);
        return Boolean.TRUE;
    }

}
